// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueForm from 'vue-form'
import App from './App'
import router from './router'
import fastClick from 'fastClick'
import store from './store'
// import ComFetch from 'common/fetch'
import utilFetch from 'common/utilFetch'
import Filters from 'common/flters'
import 'babel-polyfill'
import 'styles/reset.css'
import 'styles/border.css'
import 'styles/iconfont.css'

Vue.config.productionTip = false
Object.keys(Filters).forEach(k => Vue.filter(k, Filters[k])) // 注册全局过滤器
Vue.prototype.$Filters = Filters // 挂载一个全局变量
fastClick.attach(document.body)
Vue.use(VueForm)
// Vue.use(DrawerLayout)
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>',
  methods: {},
  beforeMount () {
    utilFetch.login() // 登录获取session
  }
})
